<?php

namespace app\controller\web;

use app\service\api\MemberServiceFacade;
use laytp\controller\Api;


class Common extends Api
{
    protected $noNeedAuth  = ['*'];
    protected $noNeedLogin = [];



    public function getLoginUserInfo()
    {
        $loginUserInfo = MemberServiceFacade::getUserInfo();
        return $loginUserInfo;
    }

    public function getQuestionTypeStr($typeInt)
    {
        $type = [
            1 => '单选题',
            2 => '多选题',
            3 => '判断题',
            4 => '简答题',
            5 => '填空题',
        ];

        return $type[$typeInt] ?? '未知';
    }

}
